fix(power-automate): v3.0.3 — Asia region, solution flow edits, publish state - #412
fix(power-automate): v3.0.3 — Asia region, solution flow edits, publish state#412Matt Townsend (radioblazer) wants to merge 3 commits into
Conversation
…efs, publish state Three bug fixes on top of v3.0.1: - Asia region (#347): list_environments now auto-detects MacroRegionDerivationFailed, extracts the geo name from the error, and retries with the geo-specific Flow RP endpoint (e.g. asia.api.flow.microsoft.com). All subsequent Flow RP calls in the session use the geo endpoint. Fixes all FlowAgent operations for tenants whose environments are provisioned in the Asia region. - Solution-flow connection refs (#392): edit_flow now includes the flow's connectionReferences map in the PPAPI PATCH body whenever logical-name rewrites are performed. Without it PPAPI could not resolve the connection reference name and returned WorkflowRunActionInputsInvalidProperty mid-session. - publish_flow state verification (#407): publishFlow verifies the actual flow state after calling /start via a getFlow round-trip and returns actualState in the response. If the flow is not Started, the tool returns success:false with an actionable warning (missing or unauthenticated connection). Previously a 409 Conflict was silently treated as 'already started' regardless of the real state.
There was a problem hiding this comment.
Pull request overview
This PR updates the power-automate plugin metadata version to v3.0.2 (and its legacy mirror). The PR description, however, describes three functional bug fixes (#347/#392/#407) that are not present in the provided diffs.
Changes:
- Bump
plugins/power-automate/.plugin/plugin.jsonversion from3.0.1→3.0.2. - Bump
plugins/power-automate/.claude-plugin/plugin.jsonversion from3.0.1→3.0.2(legacy mirror).
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| plugins/power-automate/.plugin/plugin.json | Updates the Open Plugins manifest version to 3.0.2. |
| plugins/power-automate/.claude-plugin/plugin.json | Updates the legacy manifest mirror version to 3.0.2. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| "name": "power-automate", | ||
| "version": "3.0.1", | ||
| "version": "3.0.2", | ||
| "description": "Build, edit, run, and debug Power Automate cloud flows via the FlowAgent MCP server — connection lifecycle, surgical edits, copy across environments, run management, and validated expressions.", |
There was a problem hiding this comment.
The third changed file, plugins/power-automate/server/mcp.mjs, is a 2.5 MB generated bundle and is skipped by automated review, which is why only the two manifests appear here. All of the behaviour described in the PR body lives in that bundle; the corresponding source changes are in matow_microsoft/flow-agent.
The PR description has been rewritten to match what is actually shipping (v3.0.3, seven fixes), and both manifests are consistent at 3.0.3. The branch name still reads �3.0.2 because the later fixes were added after the branch was opened.
…#416, #418) Fixes four bugs affecting edits to solution flows: - getFlowContext: use workflowEntityId/workflowUniqueId for Dataverse lookup (post-publish ID reassignment caused 404 → wrong write path) - updateFlowViaDataverse: rewrite host.connectionName → host.connectionReferenceName before writing clientdata (PPAPI reads connectionName; Dataverse stores connectionReferenceName — verbatim copy caused WorkflowRunActionInputsMissingProperty) - updateFlowViaDataverse: do not copy PPAPI-format connectionReferences into Dataverse clientdata (would corrupt Dataverse-format refs stored there) - autoMergeConnectionRefs: accept Dataverse connectioninstance rows that have no status field (old filter returned 0 candidates → spurious connection error) Also threads autoResolveConnectionRefs through editFlow, and editFlow now includes current connectionReferences in the update body. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (2)
plugins/power-automate/.plugin/plugin.json:4
- The plugin manifest version is bumped to 3.0.3, but the PR title/description says this is the v3.0.2 release. Please align the release version across the PR metadata and the manifests so consumers can correlate the published package with the changelog/issues being fixed.
"name": "power-automate",
"version": "3.0.3",
"description": "Build, edit, run, and debug Power Automate cloud flows via the FlowAgent MCP server — connection lifecycle, surgical edits, copy across environments, run management, and validated expressions.",
plugins/power-automate/.claude-plugin/plugin.json:4
- The legacy mirror manifest is also set to version 3.0.3, which conflicts with the PR title/description indicating v3.0.2. Please ensure both manifests and the PR metadata refer to the same release version.
"name": "power-automate",
"version": "3.0.3",
"description": "Build, edit, run, and debug Power Automate cloud flows via the FlowAgent MCP server — connection lifecycle, surgical edits, copy across environments, run management, and validated expressions.",
…ites Corrects two defects in the previous v3.0.3 commit. - The Dataverse clientdata write unconditionally renamed host.connectionName to host.connectionReferenceName. Solution flows do not all use the same convention, and rewriting unconditionally risked breaking flows whose stored definition uses connectionName. The write now reads which convention the flow's stored definition already uses and matches it, so it is correct for either shape and a no-op for definitions with no connector hosts. - autoMergeConnectionRefs built its resolved reference from fields that Dataverse connection reference rows do not expose, producing a reference with an undefined connection name. It now reads the correct field, carries the connection reference logical name through, and raises an actionable error instead of writing a malformed reference when no id can be read. Adds 7 regression tests covering both host-key directions, the workflow id lookup and its fallback, and the auto-merge reference shape. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Updated to v3.0.3 — adds fixes for #414, #415, #416, #418 Four root causes behind the solution-flow edit failures:
Also: Testing: 978 unit tests passing, including 7 new regression tests pinning both host-key directions, the workflow id lookup and its fallback, and the auto-merge reference shape. Live smoke test passed in 16.7s. Edited to repair mangled characters in the original version of this comment, and to bring the PR description in line with what is actually shipping. |
Summary
Seven bug fixes for the
power-automateplugin, released as v3.0.3.Both manifests (
.plugin/plugin.jsonand.claude-plugin/plugin.json) and the bundled server (server/mcp.mjs) are updated together. The branch name still saysv3.0.2because the v3.0.3 fixes were added to this branch after it was opened; the shipped version is v3.0.3.Fixes
#347 — Asia-region tenants: every operation fails
list_environmentsand all subsequent Flow RP calls now detectMacroRegionDerivationFailed, extract the geo name from the error, and retry against the geo-specific endpoint (for exampleasia.api.flow.microsoft.com). The resolved endpoint is reused for the rest of the session. Previously every operation failed for any tenant whose environments are provisioned in the Asia region.#407 —
publish_flowreports success while the flow stays Stoppedpublish_flownow reads the flow back after/startand returns the observed state asactualState. If the flow did not reachStarted— for example because a connection is missing or unauthenticated — the tool returnssuccess: falsewith an actionable warning. Previously a409 Conflictwas mapped toalreadyStarted: trueregardless of the real state.#414, #416 — solution flows unresolvable after publishing
get_flow_contextlooked the Dataverse row up by the PPAPI flow id. Publishing reassigns that id while Dataverse keeps the originalworkflowid, so the lookup returned 404, the flow was reported asinSolution: false, and writes were routed down the PPAPI path — which cannot express a connection-reference binding.The lookup now uses
workflowEntityIdandworkflowUniqueIdfrom the PPAPI response, falling back to the flow id when they are absent. This also covers the case where one flow is addressable by two valid PPAPI ids.#415, #418 — definition edits rejected on solution flows
Two problems on the Dataverse write path:
get_flowreturnshost.connectionName, but a flow's storedclientdatamay use eitherconnectionNameorconnectionReferenceNamedepending on how it was authored. The write now reads which convention the stored definition already uses and matches it, rather than assuming one. Writing the wrong key producedWorkflowRunActionInputsMissingProperty, naming an action the edit never touched.connectionReferencesintoclientdata, which would have overwritten the Dataverse-format references already stored there.#392, #416 — spurious "No connected connection found"
autoMergeConnectionRefsfiltered Dataverse connection reference rows on a status field those rows do not have, so every candidate was dropped and the tool reported no connected connection for a connector that demonstrably had one.The filter now understands both row shapes. Fixing it surfaced a second, latent defect: the resolved reference was built from fields Dataverse rows do not expose, yielding an undefined connection name and silently writing a malformed reference. The reference is now built from the correct fields, carries the connection reference logical name through, and raises an actionable error instead of writing a malformed reference when no id can be read.
edit_flowalso now carries the flow's current connection references into the update body, andautoResolveConnectionRefsis exposed on bothedit_flowandupdate_flowso auto-merge can be disabled by callers that supply their own references.Testing
clientdataconnection references left untouched, and the auto-merge reference shape in both the resolvable and unreadable cases.matow_microsoft/flow-agentmain.Note for reviewers
Automated review reports "only the plugin version fields changed" because the third changed file,
plugins/power-automate/server/mcp.mjs, is a 2.5 MB generated bundle that is skipped during review. All of the behaviour described above lives in that bundle; the corresponding source changes are inmatow_microsoft/flow-agent.The host-key detection for #415/#418 is inferred from the reported reproductions rather than confirmed against a tenant holding a
connectionReferenceName-shaped flow. It is written to match whatever the stored definition already uses, so it degrades to current behaviour rather than breaking if that inference is wrong, but confirmation against a real affected flow would be worthwhile.